$(".inf").click(function (){
    console.log($(this).parents('tr').children('.thisItemId').text());
    $.ajax({
        type:"get",
        url:"/getItemInf",
        dataType:"json",
        contextType:"application/json;charset=UTF-8",
        data:'itemid_edit='+$(this).parents('tr').children('.thisItemId').text(),
        //data:'itemId='+$('#thisItemId').text(),
        success:function (result){
            console.log(result);
            for(var i=0;i<result.length;i++){
                $("#itemid_edit").val(result[i].itemId);
                $("#productid_edit").val(result[i].productId);
                $("#listprice_edit").val(result[i].listPrice);
                $("#unitprice_edit").val(result[i].unitCost);
                $("#attr1_edit").val(result[i].attribute1);
                $("#attr2_edit").val(result[i].attribute2);
                $("#attr3_edit").val(result[i].attribute3);
                $("#attr4_edit").val(result[i].attribute4);
                $("#attr5_edit").val(result[i].attribute5);
            }
        }
    })
})

$(".inf1").click(function (){
    console.log(1234);
    console.log($(this).parents('tr').children('.thisItemId').text());
    $.ajax({
        type:"delete",
        url:"/Items/singleItem",
        dataType:"json",
        contextType:"application/json;charset=UTF-8",
        data:'itemId='+$(this).parents('tr').children('.thisItemId').text(),
        success: function (){
        }
    })
    $(this).parent().parent().remove();
})

function showPopup() {
    document.getElementById("overlay").style.display = "block";
    document.getElementById("popup").style.display = "block";
}

function hidePopup() {
    document.getElementById("overlay").style.display = "none";
    document.getElementById("popup").style.display = "none";
}